﻿using Prism.Events;

namespace UsingEventAggregator.Core
{
    public class MessageSentEvent : PubSubEvent<string>
    {
    }
    public class ChangeLanguageEvent : PubSubEvent<string>
    {
        public static string CurLanguage { get; set; }
    }

    public class ChangeUIViewEvent : PubSubEvent<string>
    {
        public static string UIName { get; set; }
    }


    public class SetCANInitConfigEvent : PubSubEvent
    {

    }

    public class CanWriteCountChangeEvent : PubSubEvent
    {

    }
    public class CanRecvCountChangeEvent : PubSubEvent
    {

    }
    public class CanWriteErrEvent:PubSubEvent
    {

    }
    public class ConnectCanEvent : PubSubEvent
    {

    }
    public class DisConnectCanEvent : PubSubEvent
    {


    }
    public class RefreshCanEvent : PubSubEvent
    {

    }

    public class SyncInnerToUIEvent : PubSubEvent
    {

    }
    public enum MonitorType
    {
        Pri,
        Odd,
        All
    }
    public class MonitorDataEvent : PubSubEvent<MonitorType>
    {

    }

    public class SaveToCanSystemEvent : PubSubEvent<(bool AutoSaveToInherSFM, bool EqualWrite)>
    {
        /// <summary>
        /// 不相等时直接同步InherDoc和SFM，不经过Can
        /// </summary>
        //public static bool AutoSaveToInherSFM = false;

        /// <summary>
        /// 相等时也写入Can
        /// </summary>
        //public bool EqualWrite;

    }
    public class TestUIVisibilityEvent : PubSubEvent<bool>
    {

    }

    public class IntoRootModelEvent : PubSubEvent<bool>
    {
    }

    /// <summary>
    /// 状态栏全局显示,不会自动清除
    /// </summary>
    public class GloablMsgEvent : PubSubEvent<string>
    {
    }

    public class CanStatusChangeEvent : PubSubEvent
    {
        public static bool Can1Online { get; set; }
        public static bool Can2Online { get; set; }
    }

    public class OpenSFMIsChangeEvent : PubSubEvent
    {
    }

    public class SFMParameterIsChangeEvent : PubSubEvent<decimal>
    {
        public static int Count { get; set; }
    }

    public class OpenSFMEvent : PubSubEvent
    {
    }

    public class SaveSFMEvent : PubSubEvent
    {
    }

    public class SaveSFMOkEvent : PubSubEvent
    {
    }

    public class InitCan1ConfigEvent : PubSubEvent<(object, bool)>
    {

    }
    public class InitCan2ConfigEvent : PubSubEvent<(object, bool)>
    {

    }

    public class InitCan1ConfigOkEvent : PubSubEvent<(object, bool)>
    {

    }

    public class InitCan2ConfigOkEvent : PubSubEvent<(object, bool)>
    {

    }

    public class GeneralSettingIsChangeEvent : PubSubEvent<object>
    {

    }


    public class NewErrorHistoryEvent : PubSubEvent<(uint ErrCode, int DevIndex)>
    {

    }

    public class CanNewErrorHistoryEvent : PubSubEvent<(int ErrCode, int DevIndex)>
    {
        public static int DevIndex;
        public static int EErrClass;
        public static string ErrName;
        public static string ErrAddInfo;
    }

}
